package com.karry.service;

import com.karry.pojo.Blog;
import com.karry.pojo.Comment;
import com.karry.util.Page;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;

public interface CommentService {

    //查询某篇全部一级评论
    ArrayList<Comment> searchBlogFatherComment(int id);

    //查询某个一级评论全部回复
    ArrayList<Comment> searchBackComment(int id);

    //评论
    Comment insertComment(int bID, int uID, String text, int cID, int bUID, String lText);

    //获取通知
    ArrayList<Comment> searchNotify(int id);

    //清除通知标记
    int updateNotify(int bId, int bUId);

    //分页查询
    Page<Comment> searchCommentByPage(String index, String size);

    //删除评论
    int deleteComment(int id, HttpServletRequest request);

    //恢复评论
    int liveComment(int id, HttpServletRequest request);

    //查询全部
    ArrayList<Comment> searchAllComment();

    //获取第一条通知
    Comment searchFirstNotify(int id);

    //清除通知 by id
    int updateNotify_(int id);
}
